<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .dark {
        background-color: black;
      }
      :not(.dark) {
        filter: invert(100%);
        -webkit-filter: invert(100%);
      }
      #root {
        color: #fff;
      }
    </style>
  </head>
  <body>
    <div id="root">
      <div>
        <h3>:not(.dark)</h3>
        <h3>localStorage vueuse-color-scheme</h3>
      </div>
      <button @click="toggleDark">toggleDark</button>
    </div>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/3.0.2/vue.global.prod.js"></script>
    <script src="https://unpkg.com/@vueuse/shared"></script>
    <script src="https://unpkg.com/@vueuse/core"></script>
    <script>
      const { useDark, useToggle } = VueUse;
      const { createApp } = Vue;
      const App = {
        setup() {
          const isDark = useDark();
          const toggleDark = useToggle(isDark);
          return {
            toggleDark,
          };
        },
      };
      const app = Vue.createApp(App);
      app.mount("#root");
    </script>
  </body>
</html>
